﻿using System;
using System.Collections.Generic;
using System.ServiceModel;

namespace yule.IDAL
{
    /// <summary>
    /// 数据访问基类
    /// 
    /// 这里很纠结；IType 接口继承此接口（IBaseDAL） 会出现 Select方法找不到的异常
    /// 
    /// </summary>
    /// <typeparam name="T"></typeparam>
    [ServiceContract]
    public interface IBaseDAL<T> where T : class,yule.Model.IModel<T>, new()
    {
        /// <summary>
        /// 根据Id获取实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(yule.Common.WCF.ServiceException))]
        T Select(dynamic id);
    }
}